package day10;

import java.util.ArrayList;

public class studentTest {
    public static void main(String[] args) {
        ArrayList<student> list =new ArrayList<>();

        student s1=new student("张三",18);
        student s2=new student("李四",19);
        student s3=new student("王五",20);

        list.add(s1);
        list.add(s2);
        list.add(s3);

        for (int i = 0; i < list.size(); i++) {
            student temp=new student();
            temp=list.get(i);
            System.out.println(temp.name+","+temp.age);
        }
    }
}
